/*
 * Selling Partner API for Solicitations
 *
 * With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient's Message Center. The Solicitations API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
 *
 * The version of the OpenAPI document: v1
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.solicitations.v1
{
    /// <summary>
    /// A Link object.
    /// </summary>
    [DataContract(Name = "LinkObject")]
    public partial class LinkObject : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="LinkObject" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected LinkObject() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="LinkObject" /> class.
        /// </summary>
        /// <param name="href">A URI for this object. (required).</param>
        /// <param name="name">An identifier for this object..</param>
        public LinkObject(string href = default(string), string name = default(string))
        {
            // to ensure "href" is required (not null)
            if (href == null)
            {
                throw new ArgumentNullException("href is a required property for LinkObject and cannot be null");
            }
            this.Href = href;
            this.Name = name;
        }

        /// <summary>
        /// A URI for this object.
        /// </summary>
        /// <value>A URI for this object.</value>
        [DataMember(Name = "href", IsRequired = true, EmitDefaultValue = true)]
        public string Href { get; set; }

        /// <summary>
        /// An identifier for this object.
        /// </summary>
        /// <value>An identifier for this object.</value>
        [DataMember(Name = "name", EmitDefaultValue = false)]
        public string Name { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class LinkObject {\n");
            sb.Append("  Href: ").Append(Href).Append("\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
